package com.cy.pj.common.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class TestAspect {
        @Pointcut("bean(testAImpl)")
    //@Pointcut("@annotation(com.cy.pj.common.annotation.RequiredCache)")
        public void doTime(){

        }

        @Around("doTime()")
        public Object doTime(ProceedingJoinPoint joinPoint) throws Throwable {
            System.out.println("扩展方法222");
            Object obj=joinPoint.proceed();
            return obj;
        }

}
